using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using NCS.Module.DonVi.Library.DonVi;
using NCS.Module.DonVi.Library.Controler;
using NCS.Library;
using NCS.Library.Utilities;
using NCS.Library.Components.Security;

namespace NCS.Module.DonVi.Admin.UserControls
{
    public partial class ViewDetail : AuthenticatedControl
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                if (Request.QueryString["contentid"] != null && Request.QueryString["contentid"] != "")
                {
                    DonViInfo info = DonViControler.GetInfo(ConvertUtility.ToInt32(Request.QueryString["contentid"]));
                    if (info == null)
                    {
                        Response.Redirect(AppEnv.ACCESSDENY);
                        return;
                    }
                    lnkHeadline.Text = info.TenDonVi;
                    lblDate.Text = info.CreateDate.ToString("dd-MM-yyyy");
                    //if (info.AnhDaiDien != string.Empty)
                    //    imgAvatar.ImageUrl = MultimediaUtility.GetAvatar(info.AnhDaiDien);
                    //else
                    //    imgAvatar.Visible = false;
                    litBody.Text = info.NoiDung;
                }
            }
        }
    }
}